Object Collision Functions


Listed below are the Built-in Functions that can be used during the Player-instigated "Collision Phase" of an Object. They are assigned to an Object Type by entering their ID in that Type's entry in the Object Def File.

Some of these Functions can be used in combination with any Movement or Drawing Function, some only some, and some are limited to only one combination. This is determined by how the Functions affect the Object, and what types of "Extra Variables" each one requires.

Scripted Collision Functions may be used instead of the Built-in Functions, or in addition to them. If both Built-in and Scripted Collision Functions are used, the Built-in Function is processed first.

Scripted Collision Functions are called every time a Player Character moves, regardless of whether any collision has actually happened, because these Functions perform the actual collision test as well as determine what happens next if a collision has occured. For this reason, for an accurate collision test, the Function must contain a Script Command that either tests for collision between any of the selectable "Collision Box" types on a Player Character and a Game Object, or manually tests the distance between a Player Character and a Game Object.

For example, the _If(Object_Collide_Player) Script Command could be used to test for Player "Attack" collision with an Object's "Hurt" area, to "damage" the Object by using the appropriate Script Commands within that "If" Block. The same Function could also use the same Command to test for Player "Hurt" collision with an Object's "Attack" area to "damage" the player by using the appropriate Script Commands within that "if" block.

If a collision is found, it is recommended that the "_StopCurrentFunc" Command be used to prevent the Function from testing for other types of collision that could, for example, cause "damage" to both the Player and the Object when that is not the desired effect.

Index:

  0 - _OCol_None
  1 - _OCol_Item
  2 - _OCol_PlaneSwitchH
  3 - _OCol_PlaneSwitchV
  4 - _OCol_Tiled


Descriptions:
  0 - _OCol_None

  1 - _OCol_Item

  2 - _OCol_PlaneSwitchH

  3 - _OCol_PlaneSwitchV

  4 - _OCol_Tiled